home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group94b.txt / 000040_icon-group-sender _Sun Sep 4 22:49:35 1994.msg < prev    next >
Internet Message Format  |  1995-02-09  |  6KB

  1. Received: by cheltenham.cs.arizona.edu; Sun, 4 Sep 1994 18:30:53 MST
  2. To: icon-group-l@cs.arizona.edu
  3. Date: 4 Sep 1994 22:49:35 GMT
  4. From: espie@basilic.ens.fr (Marc Espie)
  5. Message-Id: <34ditv$nec@nef.ens.fr>
  6. Organization: Ecole Normale Superieure, PARIS, France
  7. Sender: icon-group-request@cs.arizona.edu
  8. References: <1994Aug31.140111.22639@midway.uchicago.edu>, <347vun$qkb@ios.com>, <1994Sep4.220207.10360@midway.uchicago.edu>
  9. Subject: Re: Icon - still alive??
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11.  
  12. In article <1994Sep4.220207.10360@midway.uchicago.edu>,
  13. Richard L. Goerwitz <goer@midway.uchicago.edu> wrote:
  14. >In article <347vun$qkb@ios.com> nmw@ios.com (Nick Williams) writes:
  15. >>
  16. [some deleted to satisfy my news-poster]
  17. >
  18. >As I pointed out before, Icon has an improved C calling interface that
  19. >allows you to dynamically load functions into the run-time system.  So
  20. >all you have to do to call a C function is to put it into a dynamically
  21. >loadable library, and load it from your Icon program.  No recompilation
  22. >of the Icon source is needed.  I like this.  There are even some exam-
  23. >ples in the new documentation for Icon 9.0.
  24.  
  25. How many architectures does that new call work under ? Not too many I think...
  26. A perfect example of how general and elegant that mechanism is :-( (I'd like
  27. it to work on every machine myself).
  28.  
  29. >
  30. >>Forcing programmers to go hack the RTL code from which icont and iconc
  31. >>are made or to write C function wrappers to system routines (plus Icon
  32. >>wrappers as well), then relink the relevant libraries and executables
  33. >>(or use loadfunc()) just to make them think twice before they use a
  34. >>system dependent function is CRAZY!
  35. >
  36. >Again, I just don't agree.  If loadfunc() isn't elegant enough, then an
  37. >improved interface should be developed at some point.  In theory it is
  38. >nice to have a language be all things to all people.  But once a lang-
  39. >uage comits to this philosophy, it's hard to know when to stop.  And the
  40. >result can be ugly and messy.  Far uglier and messier than loadfunc() -
  41. >for which there is perfectly good sample code in the Icon docs.
  42.  
  43. Just some new simple calls would help icon apply to some domains for which
  44. it becomes quite suited. For instance, writing a graphics interface to a 
  45. text-oriented program would be a cinch, provided you have the specific codes
  46. dealing with spawning other programs/interpreting their input/output in a
  47. non-blocking way... perfect application of Icon in my opinion: 
  48. text parsing + graphics. Personally, I think the setenv() system call is not
  49. so interesting, but routines to deal with sockets would enable you to write
  50. MANY interesting applications that you currently CAN'T write:
  51.  
  52. a WWW browser in Icon, for instance. Should not be that difficult... 
  53. Icon already knows about GIF files, and is VERY well suited for parsing 
  54. generalized text files. The big problem being having to use systems to get
  55. stuff through connections, where everything could be done in Icon.
  56.  
  57. >
  58. >>Indeed, and why are they putting in graphics extensions? because they
  59. >>are *useful* to have (though _I_ don't use them often); the same would
  60. >>apply to adding fork(), exec() and the like (system() is portable, but
  61. >>limiting, not to mention dangerous).
  62. >
  63. >Here's a prime example.  Creation of a new process in Unix is not atomic.
  64. >You have to copy the current process, then overlay it.  This is pretty
  65. >system dependent.  You mentioned setenv() above.  I don't believe that
  66. >the Mac has environment variables per se.  Getenv() is marginally useful
  67. >for passing information about the environment to Icon (e.g. if you want
  68. >to know what TERM type you have under Unix).  I've never needed setenv()
  69. >within Icon, myself, though.  Not so say someone wouldn't.  But then I
  70. >could see how almost every platform-specific facility might be useful
  71. >at one time or another.  That doesn't mean I want to see them as part
  72. >of the core Icon language definition.
  73.  
  74. Take your prime example and revert it: look at co-expressions under Icon.
  75. Not exactly a simple mechanism, quite messy to implement on a new machine,
  76. and liable to crash every machine with limited stack-space (just out of
  77. curiosity: does ProIcon on the Mac have co-expressions ? If so, how does 
  78. it work ?)
  79. On the other hand, if we wanted REAL subprocesses under Icon, the semantics
  80. would have to match very closely co-expression calls to be natural. I don't
  81. quite see how you can do that without extensive surgery to the Icon code.
  82. I myself believe it would be a very natural extension of the current Icon code,
  83. and rather independent of the way it would be implemented. fork() ? 
  84. CreateNewProcTags() ? Nope. I want an Icon subprocess, saying something like:
  85.  
  86. p := process(thingy)
  87. and then I say something like every e:=(expression1|expression2)@p to send 
  88. icon values to p and get some results back.
  89.  - complex values should be COPIED over, unless you want to have to deal with 
  90. shared memory issues.
  91.  - not everything is clear about non-blocking issues. Something involving the
  92. semantics of &fail would probably be necessary...
  93.  
  94. >
  95. >To back off a moment, let me just repeat that your opinion is perfectly
  96. >reasonable, and I'm sure many others share it.  There's another side,
  97. >though, and that's the one I happen to be on.
  98.  
  99. Not really a problem for you, especially if that kind of augmented behaviour
  100. is user-definable when installing Icon.
  101.  
  102. On the other hand, I noticed a dire problem while playing around with 9.0:
  103. it seems that the compiler, even without call by name of proecedures, does 
  104. NOT prune out unused procedures from its list. 
  105. Funny but sad when you link with graphics to use the standard WOpen 
  106. and get all the widgets pulled in :-(. Definitely
  107. to be fixed if the IPL is to be part of Standard Icon soon.
  108. -- 
  109. [nosave]<http://acacia.ens.fr:8080/home/espie/index.html>
  110. `Ayuka no koto... suki dayo.' (KOR, Ano Hi ni kaeritai)
  111. `$@0>@n(J $@$N$3$H!<9%$-$@$h!#(J' ($@$"$NF|$K5"$j$?$$(J)(B
  112.     Marc Espie (Marc.Espie@ens.fr)
  113.